package com.mt.roll.process.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author jiff
 * @date 2020/12/22
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "工艺参数对象", description = "用于新增和更新工艺信息")
public class ProcessFlowParam extends BaseParam {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "工艺ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 工艺名称
     */
    @ApiModelProperty(value = "工艺名称", required = true, example = "工艺管理")
    @NotBlank(message = "工艺名称不能为空")
    private String name;
    /**
     * 外部编码
     */
    @ApiModelProperty(value = "编码", required = false, example = "工艺管理")
    private String code;
    /**
     * 基板ID
     */
    @ApiModelProperty(value = "基板ID", required = false, example = "1")
    private Long substrateId;
    /**
     * bomID
     */
    @ApiModelProperty(value = "bomID", required = false, example = "1")
    private Long bomId;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注",required = false, example = "0")
    private String remark;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", required = false,example = "0")
    private String description;
}
